<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>欢迎注册</title>
    <meta name="keywords" content="H+后台主题,后台bootstrap框架,会员中心主题,后台HTML,响应式后台">
    <meta name="description" content="H+是一个完全响应式，基于Bootstrap3最新版本开发的扁平化主题，她采用了主流的左右两栏式布局，使用了Html5+CSS3等现代技术">
    <link rel="shortcut icon" href="favicon.ico"> <link href="css/bootstrap.min.css-v=3.3.5.css" tppabs="http://www.zi-han.net/theme/hplus/css/bootstrap.min.css?v=3.3.5" rel="stylesheet">
    <link href="css/font-awesome.min.css-v=4.4.0.css" tppabs="http://www.zi-han.net/theme/hplus/css/font-awesome.min.css?v=4.4.0" rel="stylesheet">
    <link href="css/plugins/iCheck/custom.css" tppabs="http://www.zi-han.net/theme/hplus/css/plugins/iCheck/custom.css" rel="stylesheet">
    <link href="css/animate.min.css" tppabs="http://www.zi-han.net/theme/hplus/css/animate.min.css" rel="stylesheet">
    <link href="css/style.min.css-v=4.0.0.css" tppabs="http://www.zi-han.net/theme/hplus/css/style.min.css?v=4.0.0" rel="stylesheet"><base target="_blank">
    <script>if(window.top !== window.self){ window.top.location = window.location;}</script>

</head>

<body class="gray-bg">

<div class="middle-box text-center loginscreen   animated fadeInDown">
    <div>
        <div>
            <h1 class="logo-name">☆</h1>
        </div>
        <h3>欢迎注册</h3>
        <p>创建一个账户</p>
        <form method="post" action="/user/register" class="form" target="_self">
            <div class="form-group">
                <input type="text" class="form-control" placeholder="请输入用户名" required="" name="username">
            </div>
            <div class="form-group">
                <input type="password" class="form-control" placeholder="请输入密码" required="" name="password1" id="password1">
            </div>
            <div class="form-group">
                <input type="password" class="form-control" placeholder="请再次输入密码" required="" name="password2" id="password2">
            </div>
            <div class="form-group">
                <input type="text" maxlength="11" oninput = "value=value.replace(/[^\d]/g,'')"   class="form-control" placeholder="请输入联系方式" required="" name="tel" id="tel">
            </div>

            <button type="submit" class="btn btn-primary block full-width m-b" id="register">注 册</button>
            <span style="color: red" th:text="${session.msg !=null ? session.msg : ''}" ></span>
            <p class="text-muted text-center"><small>已经有账户了？</small><a href="login.html" tppabs="http://www.zi-han.net/theme/hplus/login.html">去登录</a>
            </p>
        </form>
    </div>
</div>
<script src="js/jquery.min.js-v=2.1.4" tppabs="http://www.zi-han.net/theme/hplus/js/jquery.min.js?v=2.1.4"></script>
<script src="js/bootstrap.min.js-v=3.3.5" tppabs="http://www.zi-han.net/theme/hplus/js/bootstrap.min.js?v=3.3.5"></script>
<script src="js/plugins/iCheck/icheck.min.js" tppabs="http://www.zi-han.net/theme/hplus/js/plugins/iCheck/icheck.min.js"></script>
<script>
    $(document).ready(function()
        {

            $(".form").submit(function ()
            {

                var reg = /^1[0-9]{10}$/;
                if($("#tel").val().trim().length && !reg.test($("#tel").val().trim())){
                    alert('您输入的手机号码格式不正确，请重新输入');
                    return false;
                }
                if($("#password1").val()!=$("#password2").val())
                {
                    alert('您输入的两次密码不一致，请重新输入');
                    return false;
                }
                return true;
            })
        }

    );
</script>
<script type="text/javascript" src="../../../tajs.qq.com/stats-sId=9051096" tppabs="http://tajs.qq.com/stats?sId=9051096" charset="UTF-8"></script>
</body>

</html>